﻿namespace QuickGet
{
    public static class BuilderExtensions
    {
        /// <summary>
        /// AglieConfig
        /// </summary>
        /// <param name="configuration"></param>
        public static void ConfigureAgileConfigIfExists(this IConfiguration configuration)
        {
            var section = configuration.GetSection("AgileConfig");

            if (section.Value != null)
            {
                if (configuration is IConfigurationBuilder builder)
                {
                    builder.AddAgileConfig();
                }
            }
        }
    }
}
